package com.coolw.cola.statemachine.support;

import com.alibaba.cola.statemachine.Condition;
import com.coolw.cola.statemachine.dto.Order;
import org.springframework.stereotype.Component;

/**
 * 关闭订单Condition,订单状态变化前执行
 *
 * @author coolw
 * @date 2024/4/10 15:37
 */
@Component
public class CloseOrderCondition implements Condition<Order> {

    @Override
    public boolean isSatisfied(Order context) {
        // 业务处理......(比如判断哪些情况下，不能关闭订单)
        return true;
    }
}
